home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 February / EnigmA AMIGA RUN 34 (1999)(G.R. Edizioni)(IT)[!][issue 1999-02].iso / www / amitrix / trans.lha / translate / Install-Translate < prev    next >
Text File  |  1998-04-17  |  4KB  |  167 lines

  1. ; $VER: Install AwTranslate 0.1 (14.4.98)
  2. ; Based on installer scripts by WHMP
  3. ; Description: Installer script for AwTranslate AWeb ARexx script
  4.  
  5. (set v39 (>= (/ (getversion "exec.library" (resident)) 65536) 39))
  6. (set awv 3)
  7. (set awr 1)
  8. (set #needInst43 "You must use Installer version 43 or greater.  Use the Installer program from your AWeb-II disk.")
  9. (if (< (/ @installer-version 65536) 43)
  10.   (abort #needInst43)
  11. )
  12.  
  13. (set #installing "Installing ")
  14. ; offer to back up a file or drawer
  15. (procedure bumprev #bumpfile #bumptxt
  16.   (if (exists #bumpfile)
  17.     (
  18.       (set bump 1)
  19.       (while (exists (cat #bumpfile "_old" bump) ) (set bump (+ bump 1)) )
  20.       (if
  21.         (askbool
  22.           (default 1)
  23.           (prompt (cat "\n\n\nBackup " #bumpfile " as "
  24.               #bumpfile "_old" bump " ?\n\n\n "
  25.           #bumptxt ) )
  26.           (help
  27.             (cat "\n\n\n\"" #bumpfile "\" is about to be over written.\n"
  28.               "\nYou are being given the chance to back it up."
  29.               " If you are unsure select yes... just in case ;-D ."
  30.             )
  31.           )
  32.         )
  33.         ;        (rename #bumpfile (cat #bumpfile "_old" bump))
  34.         ( (set bdest (cat #bumpfile "_old" bump))
  35.           (copyfiles
  36.             (source #bumpfile)
  37.             (dest bdest)
  38.             (all)
  39.           )
  40.         )
  41.       )
  42.     )
  43.   )
  44. )
  45.  
  46. ;add a line to a settings file
  47.  
  48. (procedure addpref #preffile #preftext
  49.   (foreach "ENVARC:AWeb3" "~(program|browser|gui|network|window|settings)"
  50.     (
  51.       (if (= @each-type 2)
  52.         (run (cat "echo >>ENVARC:AWeb3/" @each-name "/" #preffile " \"" #preftext  "\"") )
  53.       )
  54.     )
  55.   )
  56.   (run (cat "echo >>ENVARC:AWeb3/" #preffile " \"" #preftext  "\"") )
  57. )
  58.  
  59. (set #no-aweb-ii
  60.   (cat "You must have completed the AWeb-II 3.1 installation before "
  61.     "you can install the %s plug-in. No AWeb3: assign has been found."
  62.   )
  63. )
  64. (if (not (exists "AWeb3:" (noreq)))
  65.   (abort (#no-aweb-ii "Utilities"))
  66. )
  67.  
  68. (set @default-dest "AWeb3:")
  69. (bumprev "envarc:aweb3"
  70.   (cat "Your previously SAVED AWeb 3.1 configuration"
  71.   " is in this directory.")
  72. ) ; backup any previous AWeb3 prefs
  73.  
  74. (set menbut
  75.   (askoptions
  76.     (prompt
  77.       "\n\nInstall translate as\n"
  78.           )
  79.     (help "\nThe GUI buttons appear on the main AWeb window"
  80. "\nThe ARexx menu is attached to the main AWeb window\n"
  81. "The Frame popup menu is used to translate individual frames\n"
  82. "GUI buttons are only available with \n"
  83. "settings-GUI-options-show user buttons on\n")
  84.             (choices "A GUI Button"
  85.               "An ARexx Menu Entry"
  86.               "A Frame Popup Menu Item"
  87.               "A Keyboard Shortcut of \"<ALT>t\"" )
  88.     (default 5)
  89.   )
  90. )
  91. (if(bitand 1 menbut)
  92. (addpref "gui" "UBUT TranslateRUN AWeb3:plugins/translate.awebrx ask")
  93. )
  94. (if(bitand 2 menbut)
  95. (addpref "gui" "AREX 9;AWeb3:plugins/translate.awebrx ask;Translate")
  96. )
  97. (if(bitand 4 menbut)
  98.       (addpref "gui" "PUPF 0TranslateRUN AWeb3:Plugins/Translate.awebrx u %u ask")
  99. )
  100. (if(bitand 8 menbut)
  101.      (addpref "gui" "UKEY 0354 run AWeb3:Plugins/Translate.awebrx ask")
  102. )
  103. (copyfiles
  104.   (source "Translate.awebrx")
  105.   (dest (tackon @default-dest "plugins"))
  106.   (prompt #installing "Translate")
  107. )
  108. (copyfiles
  109.   (source "Translate.html")
  110.   (dest (tackon @default-dest "plugins"))
  111.   (prompt #installing "Translate")
  112.   (infos)
  113. )
  114. (copyfiles
  115.   (source "awnpipe-handler")
  116.   (dest "l:")
  117.   (prompt #installing "AWNPipe-handler")
  118. )
  119.  
  120. (if (exists "sys:storage/dosdrivers" (noreq))
  121.   ; best place
  122.   (copyfiles
  123.  
  124.     (dest "sys:storage/dosdrivers")
  125.     (source "awnpipe")
  126.     (prompt #installing "AWebNews Pipe:")
  127.     (infos)
  128.   )
  129.   ; any place
  130.   (copyfiles
  131.     (dest "Devs:dosdrivers")
  132.     (source "awnpipe")
  133.     (prompt #installing "AWebNews Pipe:")
  134.     (infos)
  135.   )
  136. )
  137.  
  138.  
  139. (if (= @user-level 2)
  140.   ( bumprev "env:aweb3"
  141.     (cat "Your previous ACTIVE AWeb 3.1 configuration"
  142.     " is in this directory.")
  143.   ) ;backup any active prefs
  144. )
  145.  
  146. (delete "env:aweb3/#?" (all))
  147.  
  148. (copyfiles
  149.   (source "ENVARC:AWeb3")
  150.   (dest "ENV:AWeb3")
  151.   (all)
  152. )
  153.  
  154.  
  155. (complete 100)
  156. (set @default-dest "AWeb3:plugins")
  157.  
  158.  
  159. (exit  "\n\n" @app-name
  160.   " is now installed.\n\n"
  161.   "If this is an update instalation be sure to check your GUI "
  162. " settings for duplicate entries."
  163. "\n\n You may need to reboot your system before the new version of the "
  164. "AWNPipe: becomes active. It is used primarily for the clipboard function."
  165. )
  166.  
  167.